﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.Common;
using Automobile.service.DAL;
using System.Data;
using Automobile.service.Model;
namespace Automobile.service.BLL
{
   public class SupplierBLL
    {
       SupplierDAL dal = new SupplierDAL();
        /// <summary>
        /// 获取供应商信息
        /// </summary>
        /// <returns></returns>
        public DataTable ShowSupplier()
        {
            return dal.ShowSupplier();
        }
        // <summary>
        /// 根据供应商编号删除供应商信息
        /// </summary>
        /// <returns></returns>
        public int DelSupplier(string id)
        {
            return dal.DelSupplier(id);
        }
        /// <summary>
        /// 添加供货商信息
        /// </summary>
        /// <returns></returns>
        public int AddSupplier(Supplier s)
       {
           return dal.AddSupplier(s);
       }
        /// <summary>
        /// 根据编号获取供应商信息
        /// </summary>
        /// <returns></returns>
        public DataTable SearchSupplier(string Supplier_Name)
        {
            return dal.SearchSupplier(Supplier_Name);
        }
        /// <summary>
        /// 根据编号获取供货商信息
        /// </summary>
        /// <returns></returns>
        public DataTable GetSupplierbyID(int id)
        {
            return dal.GetSupplierbyID(id);
        }
        /// <summary>
        /// 获取全部信息记录数
        /// </summary>
        /// <returns></returns>
        public int GetCountSupplier()
        {
            return dal.GetCountSupplier();
        }
        /// <summary>
        /// 修改供货商信息
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public int uptSupplier(Supplier s)
        {
            return dal.uptSupplier(s);
        }
    }
}
